package com.business.business.web.web;

import cn.hutool.json.JSONObject;
import com.business.business.common.base.BaseController;
import com.business.business.support.annotaion.Action;
import com.business.business.support.model.RespEntity;
import com.business.business.web.service.RulesandregulationsService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

@Action
@RequestMapping(value="/rulesandregulations")
//规章制度新增
public class RulesandregulationsController extends BaseController {
    @Resource
    public RulesandregulationsService rulesandregulationsService;
    @RequestMapping(value = "/rulesandregulationsAdd",method = RequestMethod.POST)

    //前台传递的是json数据类型
    public RespEntity rulesandregulationsAdd(@RequestBody(required = false) JSONObject jsonParam)  throws Exception{
        return rulesandregulationsService.rulesandregulationsAdd(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 规章制度列表
     * @Date 16:22 2020/7/20
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/rulesandregulationsListPage",method = RequestMethod.GET)
    public RespEntity rulesandregulationsListPage(@RequestBody(required = false) JSONObject jsonParam)  throws Exception{
        return rulesandregulationsService.rulesandregulationsListPage(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description 规章制度详情
     * @Date 17:23 2020/7/20
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/rulesandregulationsDetail",method = RequestMethod.GET)
    public RespEntity rulesandregulationsDetail(@RequestBody(required = false) JSONObject jsonParam)  throws Exception{
        return rulesandregulationsService.rulesandregulationsDetail(jsonParam);
    }

    /**
     * @Author LiHaoDong
     * @Description TODO
     * @Date 11:19 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
        @RequestMapping(value = "/rulesandregulationsDelete",method = RequestMethod.POST)
    public RespEntity rulesandregulationsDelete(@RequestBody(required = false) JSONObject jsonParam)  throws Exception{
        return rulesandregulationsService.rulesandregulationsDelete(jsonParam);
    }
    
    /*
     * @Author LiHaoDong
     * @Description 规章制度修改
     * @Date 11:46 2020/7/22
     * @Param [jsonParam]
     * @return com.business.business.support.model.RespEntity
     **/
    @RequestMapping(value = "/rulesandregulationsUpdate",method = RequestMethod.POST)
    public RespEntity rulesandregulationsUpdate(@RequestBody(required = false) JSONObject jsonParam)  throws Exception{
        return rulesandregulationsService.rulesandregulationsUpdate(jsonParam);
    }
}
